Skip to content

Light Freshness Edit: ASP.NET - Caching#37087

Merged
wadepickett merged 5 commits intodotnet:mainfrom
GitHubber17:568764-i
May 6, 2026
Merged

Light Freshness Edit: ASP.NET - Caching#37087
wadepickett merged 5 commits intodotnet:mainfrom
GitHubber17:568764-i

Conversation

@GitHubber17
Copy link
Copy Markdown
Contributor

@GitHubber17 GitHubber17 commented May 1, 2026

@GitHubber17 GitHubber17 marked this pull request as ready for review May 1, 2026 06:26
@GitHubber17 GitHubber17 requested a review from tdykstra as a code owner May 1, 2026 06:26
@GitHubber17
Copy link
Copy Markdown
Contributor Author

@tdykstra - Refreshed topics for your review. See the top comment for details.

Cc @cmastr @wadepickett

Comment thread aspnetcore/performance/caching/output.md Outdated
Comment thread aspnetcore/performance/caching/response.md Outdated
Comment thread aspnetcore/performance/caching/response.md Outdated
Comment thread aspnetcore/performance/caching/distributed.md Outdated
Copy link
Copy Markdown
Contributor

@wadepickett wadepickett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed. Great work! A few minor items suggested.
I will wait for @tdykstra to review before this is merged since he owns these topics.

The output caching middleware can be used in all types of ASP.NET Core apps: [Minimal APIs](xref:fundamentals/minimal-apis), [Web API with controllers](xref:web-api/index), [MVC](xref:mvc/overview), and [Razor Pages](xref:razor-pages/index). Code examples are provided for Minimal APIs and controller-based APIs. The controller-based API examples show how to use attributes to configure caching. These attributes can also be used in MVC and Razor Pages apps.

The code examples refer to a [Gravatar class](https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/performance/caching/output/samples/7.x/Gravatar.cs) that generates an image and provides a "generated at" date and time. The class is defined and used only in [the sample app](https://github.com/dotnet/AspNetCore.Docs/tree/main/aspnetcore/performance/caching/output/samples/7.x). Its purpose is to make it easy to see when cached output is being used. For more information, see [How to download a sample](xref:fundamentals/index#how-to-download-a-sample) and [Preprocessor directives in sample code](xref:index#preprocessor-directives-in-sample-code).
The code examples refer to a [Gravatar class](https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/performance/caching/output/samples/7.x/Gravatar.cs) that generates an image and provides a "generated at" date and time. The class is defined and used only in [the sample app](https://github.com/dotnet/AspNetCore.Docs/tree/main/aspnetcore/performance/caching/output/samples/7.x). Its purpose is to make it easy to see when cached output is being used. For more information, see [How to download a sample](xref:fundamentals/index#how-to-download-a-sample) and [Preprocessor directives](/dotnet/csharp/fundamentals/program-structure/preprocessor-directives).
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wadepickett - The <xref:index#preprocessor-directives-in-sample-code> link redirects to the top of the Overview page, which provides no information about preprocessor directives. I tried to find a replacement. Can you identify a more appropriate link?

Co-authored-by: Wade Pickett <wpickett@microsoft.com>
@GitHubber17 GitHubber17 requested a review from wadepickett May 1, 2026 17:02
@wadepickett
Copy link
Copy Markdown
Contributor

wadepickett commented May 1, 2026

I deleted my suggestion for the link change for preprocessor-directives, but that also deleted the conversation history. So I'll note it here:

The link I suggested resolved to the top of the overview page which made it useless. At some point we deleted that section in the overview. Sorry to mess that up. You aleady had the best link we can provide.

Follow up for me: I will also look through the entire repo to see if that original outdated link is anywhere else and get it fixed. Thanks for finding this issue to begin with!

Copy link
Copy Markdown
Contributor

@wadepickett wadepickett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. Great work, thanks!

@tdykstra will also provide a review and then merge.

Copy link
Copy Markdown
Contributor

@tdykstra tdykstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.
One important update -- there's a new Azure Redis service

Comment thread aspnetcore/performance/caching/hybrid/includes/overview.md Outdated
Comment thread aspnetcore/performance/caching/hybrid/includes/overview.md Outdated
Comment thread aspnetcore/performance/caching/distributed.md Outdated
Comment thread aspnetcore/performance/caching/distributed.md Outdated
Comment thread aspnetcore/performance/caching/distributed.md
Comment thread aspnetcore/performance/caching/distributed.md
Comment thread aspnetcore/performance/caching/distributed.md Outdated
Comment thread aspnetcore/performance/caching/response.md Outdated
@tdykstra tdykstra self-requested a review May 1, 2026 22:05
@tdykstra tdykstra dismissed their stale review May 1, 2026 22:08

The requested change would have taken us out of the scope of light freshness edit. we will save the Redis change for another issue.

Copy link
Copy Markdown
Contributor

@tdykstra tdykstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, will merge when comments are addressed., except ignore the Redis service change.

@GitHubber17
Copy link
Copy Markdown
Contributor Author

@tdykstra - Thank you for your review. I applied your requested changes and held off on changes related to comments about changing the Azure Redis service.

@tdykstra tdykstra requested review from tdykstra and wadepickett May 5, 2026 23:58
Comment thread aspnetcore/performance/caching/distributed.md Outdated
Azure Cache for Redis link replaced with Azure Managed Redis per tdykstra
Copy link
Copy Markdown
Contributor

@wadepickett wadepickett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All review suggestions appear to be resolved. Approving and merging.

@wadepickett wadepickett merged commit 4b5debb into dotnet:main May 6, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants